#define _CRT_SECURE_NO_WARNINGS 1

#include "UI.h"
#include "Block.h"
IMAGE menu;
IMAGE game;

void UI_LoadImage()
{
	loadimage(&menu, "menu.jpg", MENUSIZE_X, MENUSIZE_Y, 0);
	loadimage(&game, "game.jpg", GAMESIZE_X, GAMESIZE_Y, 0);
}

void UI_Menu()
{
	initgraph(MENUSIZE_X, MENUSIZE_Y);
	setbkmode(TRANSPARENT);
	putimage(0, 0, &menu);
	while (1)
	{
		if (_kbhit())
		{
			_getch();
			if (GetAsyncKeyState(VK_SPACE))
			{
				closegraph();
				break;
			}
		}
	}
}

void UI_Game()
{
	initgraph(GAMESIZE_X, GAMESIZE_Y);
	setbkmode(TRANSPARENT);
	putimage(0, 0, &game);
}